package com.example.course.controller.list;

import com.example.course.service.CategoryService;
import com.example.course.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/list/api")
public class CategoryListController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("/get_category_list_api")
    public Result getCategoryListApi(){
        return Result.okResult(categoryService.list());
    }

}
